<?php 
if(!defined('ADMIN')){
	exit('Access Denied');
}


?>
<div class="pageHeader">
	<p><b>优惠券列表 > 编辑优惠券</b></p>
</div>
<div class="pageContent" >
<form method="post" action="index.php?mod=coupon&act=addedicoupon" class="pageForm required-validate" onsubmit="return validateCallback(this,navTabAjaxDone)">
<input type="hidden" name="sub" value="save" />
<input type="hidden" name="id" value="<?=$id?>" />
<div class="pageFormContent nowrap" layoutH="80" style="overFlow-x: hidden;">

    <dl>
    <dt>排序：</dt>
    <dd>
    <input type="text" name="displayorder" style="width:100px"  value="<?=$item["displayorder"]?>"/>
        <span class="info">&nbsp;</span>
    </dd>
    </dl>
    <dl>
    <dt>状态：</dt>
    <dd>
    <input type="radio" name="status" value="0" <?if(empty($item) || $item['status'] == 0)echo "checked=true";?> />正常
    <input type="radio" name="status" value="1" <?if(!empty($item) && $item['status'] == 1)echo "checked=true";?> />停止
    <input type="radio" name="status" value="2" <?if(!empty($item) && $item['status'] == 2)echo "checked=true";?> />删除
        <span class="info">&nbsp;</span>
    </dd>
    </dl>
     <dl>
    <dt>使用期限：</dt>
    <dd>
    <? echo $ezhand->tpl_form_field_daterange('datelimit1', $item, '')?>
        <span class="info">&nbsp;</span>
    </dd>
    </dl>
    <dl>
    <dt>名称：</dt>
    <dd>
    <input type="text" name="title" style="width:300px" value="<?=$item['title']?>" />
        <span class="info">&nbsp;</span>
    </dd>
    </dl>
    <dl>
    <dt>金额：</dt>
    <dd>
    <input type="text" name="money" style="width:100px" value="<?=$item['money']?>" />
        <span class="info">优惠券代表金额</span>
    </dd>
    </dl>
    <dl>
    <dt>消费金额：</dt>
    <dd>
    <input type="text" name="spendmoney" style="width:100px" value="<?=$item['spendmoney']?>" />
        <span class="info">消费金额达到多少后才发送此优惠券</span>
    </dd>
    </dl>
    <dl>
    <dt>每人可领取数量：</dt>
    <dd>
    <input type="text" name="pretotal" style="width:100px" value="<?=$item['pretotal']?>" />
        <span class="info">此设置项设置每个用户可领取此优惠券数量。</span>
    </dd>
    </dl>
    <dl>
    <dt>优惠券总数量：</dt>
    <dd>
    <input type="text" name="total" style="width:100px" value="<?=$item['total']?>" />
        <span class="info">此设置项设置优惠券的总发行数量。</span>
    </dd>
    </dl>
    <dl>
    <dt>图片：</dt>
    <dd>

       <input name="imgs0.id" id="imgs0_id" type="hidden" value="">
        <input name="imgs0.fileName" class="readonly textInput" id="imgs0_fileName" style="width: 300px;" type="text" readonly="readonly" value="<?=$item["thumb"]?>">
        <a title="" class="btnPic" href="index.php?mod=content&amp;act=upload" width="460" height="200" lookupgroup="imgs0">附件</a>
        <input name="imgs0.title" class="textInput" id="imgs0_title" type="text" value="" style="display: none;">
       <span class="info">&nbsp; &nbsp;<img style="cursor: pointer;" onclick="javascript:clearimginfo('imgs0_')" src="images/cross.png"> 默认缩略图</span>


    </dd>
    </dl>
    <dl>
       
    <dt>内容：</dt>
    <dd>
    <textarea name="content" rows="8" cols="60"><?=$item["content"]?></textarea>
    </dd>
    </dl>
    
</div>
<div class="formBar">
<ul style="float:left;">
<li><div class="buttonActive"><div class="buttonContent"><button type="submit">保 存 优 惠 券</button></div></div></li>
</ul>
</div>
</form>

<script type="text/javascript">
function clearimginfo(divid){
    $("#"+divid+"title").val("");
    $("#"+divid+"id").val("");
    $("#"+divid+"fileName").val("");
    
}
</script>